package com.abnormal;


public class Login {
    private String userName1 = "admi";
    private String password1 = "123456";

    public void loginInfo(String userName,String password) throws UserNameException, PasswordException {
        if(!userName1.equals(userName)){
            throw new UserNameException("用户名错误！");
        }
        if(!password1.equals(password)){
            throw new PasswordException("密码错误！");
        }
        System.out.println("登录成功……");
    }
}
